#version 300 es

#ifdef GL_ES
precision mediump float;
#endif

#define TWO_PI 6.28318530718

uniform vec2 u_resolution;
uniform float u_time;

out vec4 outColor;

void main() {

  float solution = min(u_resolution.x, u_resolution.y);
  vec2 st = (gl_FragCoord.xy - u_resolution / 2.0) / solution;
  vec2 s = vec2(1.0, 1.0) - step(0.5, abs(st));
  if(s.x * s.y < 0.00001) {
    discard;
  }
  st = st + vec2(0.5, 0.5);

  vec3 color = vec3(0);
  vec2 bl = step(vec2(0.1), st);

  vec2 tr = step(vec2(0.1), vec2(1.0) - st);

  float pct = bl.x * bl.y * tr.x * tr.y;
  color = vec3(pct);

  outColor = vec4(color, 1.0);
}
